package com.zygh.policeasset.mapper;

import com.zygh.policeasset.pojo.RoadCross;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/mapper/RoadCrossMapper.class */
public interface RoadCrossMapper {
    @Select({"<script>select * from road_cross <where> <if test='name != null and name.length &gt; 0'> name like concat('%',#{name},'%') </if></where>order by id desc</script>"})
    @Results({@Result(property = "assetNum", column = "asset_num")})
    List<RoadCross> findByNameLike(@Param("name") String str);

    @Update({"<script>update road_cross set name=#{name} <where> <if test='id != null'> id = #{id} </if></where></script>"})
    Integer update(RoadCross roadCross);

    @Update({"<script>update road_cross set asset_num=#{assetNum} <where> <if test='id != null'> id = #{id} </if></where></script>"})
    Integer updateById(RoadCross roadCross);

    @Insert({"insert into road_cross (name) values(#{name,jdbcType=VARCHAR}) "})
    Integer add(RoadCross roadCross);

    @Delete({"delete from road_cross where id = #{id} "})
    Integer delete(@Param("id") Integer num);

    @Select({"select * from road_cross "})
    List<RoadCross> findall();

    @Select({"<script>select * from road_cross where name = #{name}</script>"})
    @Results({@Result(property = "assetNum", column = "asset_num")})
    RoadCross findByName(@Param("name") String str);
}